package ac.svn.accesscontrol.ui;

import java.awt.Color;

import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

import ac.svn.accesscontrol.utils.UIUtility;

public class XMenuBar extends JMenuBar implements IUIConstants{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private JMenu actionMenu;
	private JMenu toolsMenu;
	private JMenu helpMenu;
	private JMenuItem mntmNewMenuItem;

	public XMenuBar()
	{
		super();
		initComponents();
		initialProperty();
	}

	private void initComponents() {

		actionMenu = new JMenu("Action");
		toolsMenu = new JMenu("Tools");
		helpMenu = new JMenu("Help");

		add(actionMenu);
		add(toolsMenu);
		add(helpMenu);

		helpMenu.add(new JMenuItem("F1   - Help Topics"));
		
		mntmNewMenuItem = new JMenuItem("F2  - Save Configuration");
		helpMenu.add(mntmNewMenuItem);
		helpMenu.add(new JMenuItem("F3   - User/Group Search"));
		helpMenu.add(new JMenuItem("F4   - Location Search"));
		helpMenu.add(new JMenuItem("F5   - Refresh Data"));
		helpMenu.add(new JMenuItem("F6   - Reload Access File"));
		helpMenu.add(new JMenuItem("F11 - Maximize Window"));

		setBackground(Color.WHITE);

		registerComponents();
	}

	private void registerComponents() 
	{
		UIComponentLibrary.addComponent(M_ACTION_MENU, actionMenu);
		UIComponentLibrary.addComponent(M_TOOL_MENU,toolsMenu);
	}
	private void initialProperty()
	{
		setBackground(Color.WHITE);
		UIUtility.setAllShadowedBorder(this);
	}

}
